package com.chx.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author cp-月入过万
 * @Date 2025/5/29
 * 采购订单
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseOrders implements Serializable {
    private static final long serialVersionUID = 1L;

    //采购订单ID
    private Long orderId;

    //采购订单编号
    private String orderNumber;

    //供应商ID，外键关联供应商表
    private Long supplierId;

    //创建人ID，外键关联用户表
    private Long userId;

    //采购订单日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  orderDate;

    //预计到货日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expectedArrivalDate;

    //订单总金额
    private Double totalAmount;

    //订单状态（0：待审核，1：已审核，2：已发货，3：已完成，4：已取消）
    private int status;

    //备注
    private String remark;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
